//
//  WXCNetWorkTool.h
//  zhifubao
//
//  Created by dllo on 15/12/1.
//  Copyright © 2015年 WXCLegendary. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AFNetworking.h"

//请求成功的block类型
typedef void(^SuccessBlock)(id result);
//请求失败的block类型
typedef void(^FailBlock)(NSError *error);
//返回值类型
typedef NS_ENUM(NSUInteger, ResponseType) {
    ResponseTypeJson,
    ResponseTypeXML,
    ResponseTypeDATA,
};

//body类型

typedef NS_ENUM(NSUInteger, BodyType) {
    BodyTypeString,
    BodyTypeDictionary,
};


@interface WXCNetWorkTool : NSObject



//get
+ (void)getWithUrl:(NSString *)url parameter:(NSDictionary *)parameter httpHeader:(NSDictionary *)header responseType:(ResponseType)responseType success:(SuccessBlock)success fail:(FailBlock)fail;

//POST


/**
 *  POST请求
 *
 *  @param url          url
 *  @param body         body请求体
 *  @param bodyType     body类型
 *  @param header       请求头
 *  @param responseType 返回值类型
 *  @param success      成功
 *  @param fail         失败
 */


+ (void)postWithURL:(NSString *)url body:(id)body bodyType:(BodyType)bodyType httpHeader:(NSDictionary *)header responseType:(ResponseType)responseType success:(SuccessBlock)success fail:(FailBlock)fail;





//post















@end
